﻿{% extends "base.html" %}
{%block doc_js%}
$(document).ready(function(){
    $("#nav_main").addClass("current");
})
{%endblock%}

{%block sub_nav%}
{%endblock%}

{%block foot_nav%}
{%endblock%}

{% block content %}
<div class="info">以下是大家刚刚分享的图片:</div>        {% if entries %}
{% for entry in entries %}
<div class="entry_holder" >
<div  class="entry_holder_left_nested">
{%if entry.image%}
<div class="image_holder" >
<a href="/entry/{{ entry.key.id }}" title="" >
<img class="image"  src="/image/{{ entry.image.key.id }}?w=450&h=1000"/>
</a>
</div>
{%endif%}
</div>
<div class="entry_holder_right_nested">
<div class="entry">
<div>
by <b>{% if entry.author.nickname %}
<a href="/user/{{entry.author.key.id}}">{{entry.author.nickname}}</a>
{%else%}
"匿名人士"
{%endif%}
</b>
at
{{ entry.date|timezone:8|date:"Y-m-d H:i:s" }}
</div>
<div>
来源:
{%if entry.image_purl%}
<a href="{{entry.image_purl}}">{{entry.image_purl}}</a>
{%else%}
不详
{%endif%}
</div>
<div>
{% if admin %}|&nbsp;<a href="/entry/del/{{ entry.key.id }}" onclick="return confirm('确定要删除吗?')">Delete</a>| <a href="/entry/edit/{{ entry.key.id }}">Edit</a>{% endif %}
</div>
{%if entry.comment%}
<div class="comment">{{ entry.comment|escape|linebreaks }}</div>
{%endif%}
</div>
<div class="replies">
<div class="new_reply">                    {% if current_user %}
>><a href="" onclick="$('#new_reply_form_{{entry.key.id}}').toggle(); $('#new_reply_form_{{entry.key.id}} textarea').focus(); return false;">我来说两句</a>
{% else %}
<a href="/login/">>>我来说两句</a>
{% endif %}
<div id="new_reply_form_{{entry.key.id}}" style="display: none;">
<form id="reply_form" action="/reply/new/?entry_id={{entry.key.id}}&redirect_to=/" enctype="multipart/form-data" method="post">
<div><textarea name="comment" rows="5"style="width: 100%;"></textarea></div>
<div><input type="submit" value="Submit" /></div>
</form>
</div>
</div>
{% if entry.replies %}
{% for reply in entry.replies %}
<div class="reply"><b><a href="/user/{{entry.author.key.id}}">{{entry.author.nickname}}</a></b> 在{{reply.date|zh_timesince}}之前说:{{ reply.comment|escape|linebreaks }}</div>
{% endfor %}
{% endif %}

</div>
</div>
</div>
{% endfor %}

{% endif %}

{% endblock %}

